<?php

/**
 * @author Archer
 * @note 信息头处理
 * @mail 188802862@qq.com
 */

namespace console\http;

use \console\core\manager\InstanceManager;

class Header extends InstanceManager
{
    //设置Header信息
    static function set($key = '', $val = '')
    {
        return self::Headers()->set($key , $val);
    }

    //获取Header信息
    static function get($name = '' , $prototype = false)
    {
        return self::Request()->getHeader($prototype?strtoupper($name):'HTTP_'.strtoupper($name));
    }
}